package com.bbx.api.gclient;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.bbx.api.sdk.Config;
import com.bbx.api.sdk.SDK;

/**
 * 广播，返回数据广播，通过监听器返回结果，启动广播，在通过这个广播，通知你想要的内容
 */
public class GMsgBroadcastReceiver extends BroadcastReceiver {
	public final static String TAG = "G_CLIENT_MSG"+Config.APP_STYPE+Config.getInstance().APP_PLATFORM;

	@Override
	public void onReceive(final Context context, Intent intent) {
		try {
			String action = intent.getAction();
			String msg = intent.getStringExtra("msg");
			GMsg notify = new GMsg(msg);
			SDK.ins.publisher.publish(notify);
		} catch (Exception e) {
		}
	}

}
